<?php
	$motherID = $_GET['mother_id'];
	$embrioID = $_GET['embrio_id'];
	$motherName = $_GET['mother_name'];
	$motherAddr = $_GET['mother_address'];			
	$motherWeight = $_GET['mother_weight'];
	$motherHeight = $_GET['mother_height'];
	$motherEtnis = $_GET['mother_etnis'];
	$motherPar = $_GET['mother_parity'];
	$embrioEDD = $_GET['mother_edd'];
	$embrioSex =  $_GET['kelamin'];
	
	$con = mysql_connect('localhost', 'root', '');
	if (!$con) die('Could not connect: ' . mysql_error());
	
	mysql_select_db("gestation", $con);	
	
	$sql = "UPDATE mother SET mother_name = '$motherName', mother_address = '$motherAddr',mother_weight = '$motherWeight', 
		mother_height = '$motherHeight',mother_etnis = '$motherEtnis', mother_parity = '$motherPar' WHERE mother_id='$motherID'";
	mysql_query($sql, $con) or die("Error updating data pasien 1. Contact your administrator");
			
	$sql1 = "UPDATE embrio SET embrio_edd = '$embrioEDD', embrio_sex = '$embrioSex' WHERE embrio_id='$embrioID'";
	mysql_query($sql1, $con) or die("Error updating data pasien 2. Contact your administrator");
	
	echo "oke";

	mysql_close($con);
?>